package cn.dgiot.fd.service;

import com.aliyuncs.iot.model.v20180120.CreateConsumerGroupResponse;
import com.aliyuncs.iot.model.v20180120.CreateConsumerGroupSubscribeRelationResponse;
import com.aliyuncs.iot.model.v20180120.CreateProductTopicResponse;
import com.aliyuncs.iot.model.v20180120.CreateSubscribeRelationResponse;
import com.aliyuncs.iot.model.v20180120.DeleteConsumerGroupResponse;
import com.aliyuncs.iot.model.v20180120.QueryConsumerGroupByGroupIdResponse;
import com.aliyuncs.iot.model.v20180120.QueryProductTopicResponse;
import com.aliyuncs.iot.model.v20180120.QuerySubscribeRelationResponse;
import com.aliyuncs.iot.model.v20180120.UpdateConsumerGroupResponse;
import com.aliyuncs.iot.model.v20180120.UpdateSubscribeRelationResponse;

import cn.dgiot.fd.model.MessageModel;

/**
 * [消息相关]
 * @author
 *
 */
public interface IMessageService {

	/**
	 * [创建消息消费组]
	 * @param messageModel
	 * @return
	 */
	CreateConsumerGroupResponse createConsumerGroup();
	
	/**
	 * [修改消息消费组]
	 * @param messageModel
	 * @return
	 */
	UpdateConsumerGroupResponse updateConsumerGroup(MessageModel messageModel);
	
	/**
	 * [删除消息消费组]
	 * @param messageModel
	 * @return
	 */
	DeleteConsumerGroupResponse deleteConsumerGroup(MessageModel messageModel);
	
	/**
	 * [删除消息消费组]
	 * @param messageModel
	 * @return
	 */
	QueryConsumerGroupByGroupIdResponse queryConsumerGroupByGroupId(MessageModel messageModel);
	
	/**
	 * [创建AMQP服务端订阅]
	 * @param messageModel
	 * @return
	 */
	CreateSubscribeRelationResponse createSubscribeRelation(String messageConsumerGroupId);
	/**
	 * [修改AMQP服务端订阅]
	 * @param messageModel
	 * @return
	 */
	UpdateSubscribeRelationResponse updateSubscribeRelation(String messageConsumerGroupId);
	/**
	 * [查询AMQP服务端订阅]
	 * @param messageModel
	 * @return
	 */
	QuerySubscribeRelationResponse querySubscribeRelation();
	
	/**
	 * [在AMQP订阅中添加一个消费组]
	 * @param messageModel
	 * @return
	 */
	CreateConsumerGroupSubscribeRelationResponse createConsumerGroupSubscribeRelation(MessageModel messageModel);
	
	/**
	 * [消息组 消费者初始化]
	 * @param messageModel
	 */
	void messageInit();
	
	/**
	 * [查询topic]
	 * @return
	 */
	QueryProductTopicResponse queryProductTopic();
	
	
	/**
	 * [创建topic]
	 * @return
	 */
	CreateProductTopicResponse createProductTopic();
	
	/**
	 * [自定义消息通道初始化]
	 */
	void customTopicInit();
}
